
#ifndef IList_t_h
#define IList_t_h

#include <Typedef.h>
#include <Defines.h>

#include "System/Object.h"
#include "System/Collections/Generic/ICollection.h"
#include "System/Collections/Generic/IEnumerable.h"

namespace Riccsson
{
	namespace System
	{
		namespace Collections
		{
			namespace Generic
			{
				 // Summary:
				//     Represents a collection of objects that can be individually accessed by index.
				//
				// Type parameters:
				//   T:
				//     The type of elements in the list.
				template<typename T> interface IList :
					public ICollection<T>
				{
				public: 
					// Summary:
					//     Gets or sets the element at the specified index.
					//
					// Parameters:
					//   index:
					//     The zero-based index of the element to get or set.
					//
					// Returns:
					//     The element at the specified index.
					//
					// Exceptions:
					//   System.ArgumentOutOfRangeException:
					//     index is not a valid index in the System.Collections.Generic.IList<T>.
					//
					//   System.NotSupportedException:
					//     The property is set and the System.Collections.Generic.IList<T> is read-only.
					virtual T& operator[] (int index) = 0;

					// Summary:
					//     Determines the index of a specific item in the System.Collections.Generic.IList<T>.
					//
					// Parameters:
					//   item:
					//     The object to locate in the System.Collections.Generic.IList<T>.
					//
					// Returns:
					//     The index of item if found in the list; otherwise, -1.
					virtual int IndexOf(const T& item) = 0;
					//
					// Summary:
					//     Inserts an item to the System.Collections.Generic.IList<T> at the specified
					//     index.
					//
					// Parameters:
					//   index:
					//     The zero-based index at which item should be inserted.
					//
					//   item:
					//     The object to insert into the System.Collections.Generic.IList<T>.
					//
					// Exceptions:
					//   System.ArgumentOutOfRangeException:
					//     index is not a valid index in the System.Collections.Generic.IList<T>.
					//
					//   System.NotSupportedException:
					//     The System.Collections.Generic.IList<T> is read-only.
					virtual void Insert(int index, const T& item) = 0;
					//
					// Summary:
					//     Removes the System.Collections.Generic.IList<T> item at the specified index.
					//
					// Parameters:
					//   index:
					//     The zero-based index of the item to remove.
					//
					// Exceptions:
					//   System.ArgumentOutOfRangeException:
					//     index is not a valid index in the System.Collections.Generic.IList<T>.
					//
					//   System.NotSupportedException:
					//     The System.Collections.Generic.IList<T> is read-only.
					virtual void RemoveAt(int index) = 0;
				};
			}
		}
	}
}

#endif // ILIST_H